﻿{template 'header', 'member'}
<div class="menu">
<table cellpadding="0" cellspacing="0">
<tr>
<td class="tab" id="add"><a href="alert.php?action=add"><span>Add Reminder</span></a></td>
<td class="tab_nav">&nbsp;</td>
<td class="tab" id="s3"><a href="alert.php"><span>Has passed<span class="px10">({$nums[3]})</span></span></a></td>
<td class="tab_nav">&nbsp;</td>
<td class="tab" id="s2"><a href="alert.php?status=2"><span>Audit<span class="px10">({$nums[2]})</span></span></a></td>
</tr>
</table>
</div>
{if $action=='add' || $action=='edit'}
<form method="post" action="alert.php" id="dform">
<input type="hidden" name="action" value="{$action}"/>
<input type="hidden" name="post[mid]" value="{$mid}"/>
<input type="hidden" name="itemid" value="{$itemid}"/>
<input type="hidden" name="forward" value="{$forward}"/>
<table cellpadding="6" cellspacing="1" class="tb">
<tr>
<td class="tl">Business Type</td>
<td class="tr f_b">{$MODULE[$mid][name]}</td>
</tr>
<tr>
<td class="tl">Keyword</td>
<td class="tr"><input type="text" name="post[word]" id="word" size="30" value="{$word}" maxlength="30"/><span id="dword" class="f_red"></span></td>
</tr>
<tr>
<td class="tl">Category</td>
<td class="tr"><div id="catesch"></div>{ajax_category_select('post[catid]', '', $catid, $mid, 'size="2" style="height:120px;width:180px;"')}<span id="dcatid" class="f_red"></span></td>
</tr>
<tr>
<td class="tl">Area</td>
<td class="tr">{ajax_area_select('post[areaid]', 'Please select', $areaid)} <span id="dareaid" class="f_red"></span></td>
</tr>
<tr>
<td class="tl">Transmission frequency</td>
<td class="tr">
<select name="post[rate]">
<option value="0"{if $rate==0} selected{/if}>Any</option>
<option value="1"{if $rate==1} selected{/if}>1Day</option>
<option value="3"{if $rate==3} selected{/if}>3Day</option>
<option value="7"{if $rate==7} selected{/if}>7Day</option>
<option value="15"{if $rate==15} selected{/if}>15Day</option>
<option value="30"{if $rate==30} selected{/if}>30Day</option>
</select>
</td>
</tr>
<tr>
<td class="tl">&nbsp;</td>
<td class="tr" height="50"><input type="submit" name="submit" value=" Determined " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" name="reset" value=" Reset " class="btn"/></td>
</tr>
</table>
</form>
<script type="text/javascript">s('alert');m('add');</script>
{elseif $action=='choose'}
<table cellpadding="6" cellspacing="1" class="tb">
<tr>
<td class="tl"><span class="f_red">*</span> Please select the type of business</td>
<td class="tr">
{loop $mids $v}
<input type="radio" name="mid" value="{$v}" id="mid_{$v}" onclick="Go('?action=add&mid={$v}');"/><label for="mid_{$v}"> {$MODULE[$v][name]}</label>&nbsp;&nbsp;
{/loop}
</td>
</tr>
</table>
<script type="text/javascript">s('alert');m('add');</script>
{else}
<div class="ls">
<table cellpadding="0" cellspacing="0" class="tb">
<tr>
<th>Category</th>
<th>Keyword</th>
<th>Industry</th>
<th>Area</th>
<th>Add Time</th>
<th>Last transmission</th>
<th>Frequency</th>
<th width="60">Management</th>
</tr>
{loop $lists $k $v}
<tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center">
<td><a href="{$MODULE[$v[mid]][linkurl]}" class="t" target="_blank">{$MODULE[$v[mid]][name]}</a></td>
<td>{if $v[word]}<a href="{$MODULE[$v[mid]][linkurl]}search.php?kw={urlencode($v[word])}" class="t" target="_blank">{$v[word]}</a>{else}Any{/if}</td>
<td>{if $v[catid]}{$v[cate]}{else}Any{/if}</td>
<td>{if $v[areaid]}<a href="{$MODULE[$v[mid]][linkurl]}search.php?areaid={$v[areaid]}" target="_blank">{area_pos($v[areaid], '-')}</a>{else}Any{/if}</td>
<td class="px11 f_gray">{timetodate($v[addtime], 5)}</td>
{if $v[sendtime]}
<td class="px11 f_gray">{timetodate($v[sendtime], 5)}</td>
{else}
<td class="f_gray">Never</td>
{/if}
<td class="f_red">{if $v[rate]}{$v[rate]}Day{else}Any{/if}</td>
<td><a href="alert.php?action=edit&itemid={$v[itemid]}"><img width="16" height="16" src="{DT_STATIC}{$MODULE[2][moduledir]}/image/edit.png" title="Modification" alt=""/></a>
<a href="alert.php?action=delete&itemid={$v[itemid]}" onclick="if(!confirm('Sure you want to delete this? This action shall be irrevocable')) return false;"><img width="16" height="16" src="{DT_STATIC}{$MODULE[2][moduledir]}/image/delete.png" title="Delete" alt=""/></a></td>
</tr>
{/loop}
</table>
</div>
{if $MG[alert_limit]}
<div class="limit">You can add a total of <span class="f_b f_red">{$MG[alert_limit]}</span> Article&nbsp;&nbsp;&nbsp;Currently added <span class="f_b">{$limit_used}</span> Article&nbsp;&nbsp;&nbsp;You can also add <span class="f_b f_blue">{$limit_free}</span> Article</div>
{/if}
<br/>
<span class="f_gray">&nbsp;&nbsp;<strong>Prompt</strong>：If you can not receive the email, please <span class="f_blue">{$DT[mail_sender]}</span> Add to your whitelist。</span>
<br/>
<div class="pages">{$pages}</div>
<script type="text/javascript">s('alert');m('s{$status}');</script>
{/if}
{template 'footer', 'member'}